The present invention relates generally to digital signal processing techniques as applied to signal editing and more particularly to digital signal processing techniques for aligning a sample signal with a primary signal to avoid cancellation of frequencies when the two signals are combined.
A common task in the production of a multimedia program involves the editing of an audio signal for the program. The audio signal is edited to enhance or augment the originally recorded audio. Typically, this involves either mixing other audio with the primary audio or totally replacing a portion of the primary audio with a new audio sample. In either case it is necessary to precisely identify the start of the audio segment audio that is to be edited so that the modified audio will seamlessly fit in with the rest of the audio. Frequently, the point of editing is associated with a particular sonic event such as a percussive hit or other distinctive, loud sound, and thus it becomes necessary to identify these events.
Co-pending U.S. patent application Ser. No. 09/359,186 titled xe2x80x9cSystem and Method of Identifying a Sonic Eventxe2x80x9d, filed on Jul. 22, 1999, which is incorporated by reference herein and has a common inventor and the same assignee as the present application, describes a system and method for identifying sonic events that are characterized by a rapid increase in volume. The method described in the application provides that the rate of change of the perceived volume of the audio signal is compared against a predetermined threshold value that corresponds to the sonic event of interest. The sound from a percussive instrument such as a piano, drum, or cymbal is an example of the type of sonic event contemplated.
As was described above, the editing of a previously recorded audio signal may involve substituting a portion of the recorded audio with a new audio sample or mixing or blending the two audio signals. Unfortunately, the mixing of two audio signals can produce a weak or thin sound as a result of the elimination of certain frequency components from the combined audio signal. The elimination of these frequency components occurs due to opposing signal magnitudes that cancel when the signals are combined. In other words, when the two signals are combined together the resulting signal may not include certain frequency components found in each individual signal because of a destructive interference between the two audio signals. The frequency spectrum of the blended signal is thus flattened, and consequently, the fullness of the sound is diminished.
It is therefor desirable to find a method and system for combining two signals that emphasizes the contribution of each signal to the resulting mixed signal as opposed to reducing these contributions due to the cancellation of certain frequency components.
The present invention provides for a method and system for mixing two signals, a primary signal and another sample, in a manner that avoids the cancellation of certain frequency components in the resulting mixed signal. The mixing of a primary signal with another sample signal or the replacement of one portion of the primary signal with another sample signal is initiated at the detection of a predetermined event in the primary signal. Advantageously, the resulting combination signal therefor retains more of the fullness of the original two segments.
In one aspect of the invention, the two signals to be mixed are audio signals. The mixing of a primary audio signal with another audio sample or the replacement of one portion of the primary audio signal with another audio sample is initiated at the detection of a predetermined sonic event in the primary audio signal. A sonic event may be characterized, in one case, as a rapid increase in the audio""s volume, the rate of which exceeds a set threshold value. Examples of such a sonic event include sounds resulting from musical instruments such as a piano, a drum, or a cymbal, which are percussive. However, other sonic events of interest may be identified and are contemplated to be within the scope of the invention. Certainly the present invention is not limited to any particular sonic event, but rather broadly contemplates a sonic event as a detectable audio event that identifies a reference location for the mixing of the two audio signals or replacement of one audio signal with another.
In a further aspect of the invention, the blending of two audio samples is accomplished in a manner that enhances the contributions of each of the signals, rather than diminishing the effect of the combination.
In a further aspect of the invention, the two audio signals are combined or mixed after an A/D converter generates a digital representation of each audio signal. When a sonic event of interest has been detected in the primary digital signal, the signal is analyzed from the point of the sonic event forward to identify the first positive and first negative excursions within the waveform. Positive excursions are tracked from the time when the signal first turns positive until the time the signal becomes negative. Conversely, negative excursions are tracked from the time when the signal first turns negative until the time the signal becomes positive again. The sample or second signal is analyzed to determine all the positive and negative excursions within the signal. Unlike the investigation of the primary signal, the analysis of the sample signal is not complete after identification of the first positive and first negative excursion.
In a yet further aspect of the invention, the single data sample having the largest value in absolute magnitude is identified by comparing sample values of the digital signal representative of the primary audio from the first positive and first negative excursion after the detected sonic event, and the polarity of the excursion containing that data sample is noted. Similarly, the data sample, having the largest value in absolute magnitude with the same polarity as the largest data sample in absolute magnitude selected from the first positive and negative excursions of the primary signal after the sonic event, is also identified in the digital representation of the audio sample.
In a still further aspect of the invention, the primary audio signal and the other audio sample are aligned according to the data sample having the largest value in absolute magnitude from the first positive and first negative excursion of the primary signal and the data sample having the largest value in absolute magnitude having the same polarity as the largest data sample in absolute magnitude, identified in the first positive and negative excursions after the sonic event in the digital representation of the primary audio signal. Advantageously, emphasizing an alignment that recognizes the polarity of the signal reinforces the contribution of each signal.
In a yet further aspect of the invention, two audio samples are aligned with respect with each other so as to avoid cancellation of opposed signal components when the signals are combined.